<?php


namespace app\mobile\controller;


use think\Controller;

class Search extends Controller
{
    public function index(){
//        $val = input('val');
//        $data = db('book')->where('name|author','like','%'.$val.'%')->select();
//        dump($data);
        return view('index');
    }
    public function doSearch()
    {
        $val = input('val');
        $data = db('book')->where('name|author','like','%'.$val.'%')->select();
        return $data;
    }
    public function learnCss()
    {
        return view('learn_css');
    }
}